package com.hexu.sharedb.controller;

import com.hexu.sharedb.entity.StuActiveInfor;
import com.hexu.sharedb.entity.SchoolTerm;
import com.hexu.sharedb.service.StuActiveInforService;
import com.hexu.sharedb.service.SchoolTermService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.sql.Timestamp;
import java.util.List;

/**
 * @author gufusheng
 * @time 2021/7/2 21:28
 */
@RestController
public class ActiveInforController {

    @Autowired
    private StuActiveInforService stuActiveInforService;

    @RequestMapping(value = "searchList", method = RequestMethod.GET)
    public List<StuActiveInfor> getItems() {
        return stuActiveInforService.getList();
    }

    @RequestMapping(value = "/getById/{sid}", method = RequestMethod.GET)
    public StuActiveInfor getItem(@PathVariable Integer sid) {
        return stuActiveInforService.getById(sid);
    }

    @RequestMapping(value = "/save", method = RequestMethod.POST)
    public Boolean saveItem(@RequestBody StuActiveInfor stuActiveInfor) {
        return stuActiveInforService.save(stuActiveInfor);
    }

}
